﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
namespace jsonTest
{
    class Program
    {
        static void Main(string[] args)
        {
            var txt = JsonConvert.SerializeObject(new MyClass()
            {
                Hi = "asdf", D=1.1
                ,
                chiled = new sb[] { new sb() { abc = "adfd" }, new sb() { abc = "ddd" } }
            });
            Console.WriteLine(txt);
            var cl = JsonConvert.DeserializeObject<MyClass>(txt);
            Console.WriteLine(cl.Hi);
            Console.WriteLine(cl.chiled[0].abc);
            Console.WriteLine(cl.D.ToString());
        }
    }
    class MyClass
    {
        public string Hi { get; set; }
        public double D { get; set; }
        public sb[] chiled { get; set; }
    }
    class sb
    {
        public string abc { get; set; }
    }
}
